06. Exercise: Define a LinearLearner
Instantiate a
LinearLearner
Now that you've uploaded your training data, it's time to define and train a model! In the main exercise notebook, you'll define and train the SageMaker, built-in algorithm,
LinearLearner
.
EXERCISE: Create a LinearLearner Estimator
You've had some practice instantiating built-in models in SageMaker. All estimators require some constructor arguments to be passed in.
See if you can complete this task, instantiating a LinearLearner estimator, using only the LinearLearner documentation as a resource.
You'll find that this estimator takes in a lot of arguments, but not all are required . My suggestion is to start with a simple model, and utilize default values where applicable. Later, we will discuss some specific hyperparameters and their use cases.
Instance Types
It is suggested that you use instances that are available in the free tier of usage: 'ml.c4.xlarge' for training and 'ml.t2.medium' for deployment.
Here is what the exercise code looks like in the main notebook:
# import LinearLearner
from sagemaker import LinearLearner
# instantiate LinearLearner
Try to complete this code on your own, and I'll go over one possible solution, next!